package j03zuoye;

public class Ticket {
    //包含车次
    private String trainNumber;
    //出发时间
    private String startTime;
    //历时
    private int duration;
    // 票价
    private double price;

    public Ticket() {
    }

    public Ticket(String trainNumber, String startTime, int duration, double price) {
        this.trainNumber = trainNumber;
        this.startTime = startTime;
        this.duration = duration;
        this.price = price;
    }

    public String getTrainNumber() {
        return trainNumber;
    }

    public void setTrainNumber(String trainNumber) {
        this.trainNumber = trainNumber;
    }

    public String getStartTime() {
        return startTime;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    public int getDuration() {
        return duration;
    }

    public void setDuration(int duration) {
        this.duration = duration;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    @Override
    public String toString() {
        return "Ticket{" +
                "trainNumber='" + trainNumber + '\'' +
                ", startTime='" + startTime + '\'' +
                ", duration='" + duration + '\'' +
                ", price='" + price + '\'' +
                '}';
    }

}
